<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::SignalSpy Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_signal_spy.html">SignalSpy</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_g_c_f_1_1_signal_spy-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::SignalSpy Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Enables introspection of signal emissions from a QObject.  
 <a href="class_g_c_f_1_1_signal_spy.html#details">More...</a></p>

<p><code>#include &lt;GCF3/SignalSpy&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a959f1bc50a00197b43b6fbaef4ed79a1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a959f1bc50a00197b43b6fbaef4ed79a1">SignalSpy</a> (QObject *<a class="el" href="class_g_c_f_1_1_signal_spy.html#a0386fcfa8ed793629bdda7dcbc7fe2ba">sender</a>, const char *<a class="el" href="class_g_c_f_1_1_signal_spy.html#a60b6efc21a060319b56c0e16a4c447fb">signal</a>, QObject *parent=nullptr)</td></tr>
<tr class="separator:a959f1bc50a00197b43b6fbaef4ed79a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0655516b8358c23f75a3b53ec8b1f54e"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a0655516b8358c23f75a3b53ec8b1f54e">~SignalSpy</a> () override</td></tr>
<tr class="separator:a0655516b8358c23f75a3b53ec8b1f54e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b65e01167f7dc5ddde56bc8dbaa7bce"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a0b65e01167f7dc5ddde56bc8dbaa7bce">isValid</a> () const</td></tr>
<tr class="separator:a0b65e01167f7dc5ddde56bc8dbaa7bce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0386fcfa8ed793629bdda7dcbc7fe2ba"><td class="memItemLeft" align="right" valign="top">QObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a0386fcfa8ed793629bdda7dcbc7fe2ba">sender</a> () const</td></tr>
<tr class="separator:a0386fcfa8ed793629bdda7dcbc7fe2ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60b6efc21a060319b56c0e16a4c447fb"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a60b6efc21a060319b56c0e16a4c447fb">signal</a> () const</td></tr>
<tr class="separator:a60b6efc21a060319b56c0e16a4c447fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa03c77efc8ec51618ee91b7b5b844b21"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#aa03c77efc8ec51618ee91b7b5b844b21">wait</a> (int timeout=5000)</td></tr>
<tr class="separator:aa03c77efc8ec51618ee91b7b5b844b21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a775779b2ec93f107c0ca3905202a84a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a775779b2ec93f107c0ca3905202a84a1">clear</a> ()</td></tr>
<tr class="separator:a775779b2ec93f107c0ca3905202a84a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7e70938eb812db1fc554330d3f95b60"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count</a> () const</td></tr>
<tr class="separator:ae7e70938eb812db1fc554330d3f95b60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63c4bd7cc8e4abb9f4accb0f70221dda"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a63c4bd7cc8e4abb9f4accb0f70221dda">isEmpty</a> () const</td></tr>
<tr class="separator:a63c4bd7cc8e4abb9f4accb0f70221dda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15500c835e130fd105a1794ddce51795"><td class="memItemLeft" align="right" valign="top">const QVariantList &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a15500c835e130fd105a1794ddce51795">first</a> () const</td></tr>
<tr class="separator:a15500c835e130fd105a1794ddce51795"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac41f5cc5f48d7d2474fa19b265333d3e"><td class="memItemLeft" align="right" valign="top">const QVariantList &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#ac41f5cc5f48d7d2474fa19b265333d3e">last</a> () const</td></tr>
<tr class="separator:ac41f5cc5f48d7d2474fa19b265333d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa031193fc3a8d40fa6bf9771d0bf9b1"><td class="memItemLeft" align="right" valign="top">QVariantList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#aaa031193fc3a8d40fa6bf9771d0bf9b1">takeFirst</a> ()</td></tr>
<tr class="separator:aaa031193fc3a8d40fa6bf9771d0bf9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9e0323e4ea180117997ad12e7a034d1"><td class="memItemLeft" align="right" valign="top">QVariantList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#ad9e0323e4ea180117997ad12e7a034d1">takeLast</a> ()</td></tr>
<tr class="separator:ad9e0323e4ea180117997ad12e7a034d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a508a02bfd99de429664b06ffc003d9a5"><td class="memItemLeft" align="right" valign="top">QVariantList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a508a02bfd99de429664b06ffc003d9a5">takeAt</a> (int index)</td></tr>
<tr class="separator:a508a02bfd99de429664b06ffc003d9a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca1109495fe964ad99312c09f00e2dfd"><td class="memItemLeft" align="right" valign="top">QVariantList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#aca1109495fe964ad99312c09f00e2dfd">at</a> (int index) const</td></tr>
<tr class="separator:aca1109495fe964ad99312c09f00e2dfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6c9e4ca60efe8f6121eab5fd02a79bf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#ae6c9e4ca60efe8f6121eab5fd02a79bf">removeAt</a> (int index)</td></tr>
<tr class="separator:ae6c9e4ca60efe8f6121eab5fd02a79bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a849feb53759303827b198888931dd545"><td class="memItemLeft" align="right" valign="top">const QList&lt; QVariantList &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a849feb53759303827b198888931dd545">emissions</a> () const</td></tr>
<tr class="separator:a849feb53759303827b198888931dd545"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a59f0b4bc8caf735a0cfdd1e4dd0e26db"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_signal_spy.html#a59f0b4bc8caf735a0cfdd1e4dd0e26db">handleSignalEmission</a> (const QVariantList &amp;args)</td></tr>
<tr class="separator:a59f0b4bc8caf735a0cfdd1e4dd0e26db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class is very similar to <code>QSignalSpy</code>, in that it can connect to any signal of any QObject instance and report signal emissions. Every signal emission is recorded as a <code>QVariantList</code>. A list of emissions captured can be fetched from the <a class="el" href="class_g_c_f_1_1_signal_spy.html#a849feb53759303827b198888931dd545">emissions()</a> function.</p>
<p>The following example records all signal emissions for the clicked() signal of a <code>QPushButton:</code> </p>
<div class="fragment"><div class="line">QPushButton *button = ...;</div>
<div class="line">QSignalSpy spy(button, SIGNAL(clicked(<span class="keywordtype">bool</span>)));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// do something that triggers the signal</span></div>
<div class="line">button-&gt;animateClick();</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Now spy would have recorded one signal emission.</span></div>
<div class="line"><span class="keywordflow">if</span>( spy.count() == 1 )</div>
<div class="line">{</div>
<div class="line">    QVariantList emission = spy.takeFirst();</div>
<div class="line">    <span class="keywordtype">bool</span> clicked = emission.at(0).toBool();</div>
<div class="line">    <span class="comment">// process clicked..</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>You can also use <a class="el" href="class_g_c_f_1_1_signal_spy.html" title="Enables introspection of signal emissions from a QObject.">GCF::SignalSpy</a> to block-wait for a signal emission. Example:</p>
<div class="fragment"><div class="line">QNetworkAccessManager nam;</div>
<div class="line">QNetworkReply *reply = nam.get(....);</div>
<div class="line"> </div>
<div class="line"><a class="code" href="class_g_c_f_1_1_signal_spy.html">GCF::SignalSpy</a> spy(reply, SIGNAL(finished()));</div>
<div class="line"><span class="keywordtype">bool</span> success = spy.wait(); <span class="comment">// blocking wait. The application will not freeze,</span></div>
<div class="line">                           <span class="comment">// event loop will continue</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">if</span>(success) {</div>
<div class="line">    <span class="comment">// While waiting, the signal-spy caught finished() signal from reply.</span></div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>The only difference between <code>QSignalSpy</code> and <a class="el" href="class_g_c_f_1_1_signal_spy.html" title="Enables introspection of signal emissions from a QObject.">GCF::SignalSpy</a> is this: while <code>QSignalSpy</code> requires usage of qtestlib module, <a class="el" href="class_g_c_f_1_1_signal_spy.html" title="Enables introspection of signal emissions from a QObject.">GCF::SignalSpy</a> doesnt. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a959f1bc50a00197b43b6fbaef4ed79a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a959f1bc50a00197b43b6fbaef4ed79a1">&#9670;&nbsp;</a></span>SignalSpy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::SignalSpy::SignalSpy </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>sender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>signal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructs a signal spy to listen for <code>signal</code> emissions from <code>sender</code>. If an invalid signal or null sender is passed as parameter; then <a class="el" href="class_g_c_f_1_1_signal_spy.html#a0b65e01167f7dc5ddde56bc8dbaa7bce">isValid()</a> will return false.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sender</td><td>pointer to an object that is sending a signal (which needs spying) </td></tr>
    <tr><td class="paramname">signal</td><td>signal name of the signal (constructed using the SIGNAL macro). This would be the signal that the needs spying. </td></tr>
    <tr><td class="paramname">parent</td><td>pointer to a parent QObject for this signal-spy instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0655516b8358c23f75a3b53ec8b1f54e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0655516b8358c23f75a3b53ec8b1f54e">&#9670;&nbsp;</a></span>~SignalSpy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::SignalSpy::~SignalSpy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0b65e01167f7dc5ddde56bc8dbaa7bce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b65e01167f7dc5ddde56bc8dbaa7bce">&#9670;&nbsp;</a></span>isValid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::SignalSpy::isValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if this spy is initialized on a valid QObject instance and signal. False otherwise. </dd></dl>

</div>
</div>
<a id="a0386fcfa8ed793629bdda7dcbc7fe2ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0386fcfa8ed793629bdda7dcbc7fe2ba">&#9670;&nbsp;</a></span>sender()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QObject * GCF::SignalSpy::sender </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>pointer to the sender object that is sending the signal, which is being spied on by this instance.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The function returns NULL if the sender was destroyed after the spy was created. </dd></dl>

</div>
</div>
<a id="a60b6efc21a060319b56c0e16a4c447fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60b6efc21a060319b56c0e16a4c447fb">&#9670;&nbsp;</a></span>signal()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray GCF::SignalSpy::signal </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>complete normalized signature of the signal that this spy is spying on. </dd></dl>

</div>
</div>
<a id="aa03c77efc8ec51618ee91b7b5b844b21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa03c77efc8ec51618ee91b7b5b844b21">&#9670;&nbsp;</a></span>wait()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::SignalSpy::wait </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>5000</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Starts an event-loop internally and waits for timeout milliseconds or a signal emission to occur.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the signal emission occurred within timeout milliseconds, false if the wait stopped due to the timeout. </dd></dl>

</div>
</div>
<a id="a775779b2ec93f107c0ca3905202a84a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a775779b2ec93f107c0ca3905202a84a1">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::SignalSpy::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears all recorded signal emissions. Each signal emission is recorded as a <code>QVariantList</code> of arguments (emitted by the signal). </p>

</div>
</div>
<a id="ae7e70938eb812db1fc554330d3f95b60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7e70938eb812db1fc554330d3f95b60">&#9670;&nbsp;</a></span>count()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int GCF::SignalSpy::count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the number of signal emissions recorded. </dd></dl>

</div>
</div>
<a id="a63c4bd7cc8e4abb9f4accb0f70221dda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63c4bd7cc8e4abb9f4accb0f70221dda">&#9670;&nbsp;</a></span>isEmpty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::SignalSpy::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if <a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count()</a> is ZERO, false otherwise. </dd></dl>

</div>
</div>
<a id="a15500c835e130fd105a1794ddce51795"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15500c835e130fd105a1794ddce51795">&#9670;&nbsp;</a></span>first()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QVariantList &amp; GCF::SignalSpy::first </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a const reference to the first (earliest) signal emission captured by this spy. </dd></dl>

</div>
</div>
<a id="ac41f5cc5f48d7d2474fa19b265333d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac41f5cc5f48d7d2474fa19b265333d3e">&#9670;&nbsp;</a></span>last()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QVariantList &amp; GCF::SignalSpy::last </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a const reference to the last (most recent) signal emission captured by this spy. </dd></dl>

</div>
</div>
<a id="aaa031193fc3a8d40fa6bf9771d0bf9b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa031193fc3a8d40fa6bf9771d0bf9b1">&#9670;&nbsp;</a></span>takeFirst()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QVariantList &amp; GCF::SignalSpy::takeFirst </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>copy of the first (earliest) signal emission captured by this spy.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Before returning the emission is removed from the internal list of emissions. After this function returns <a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count()</a> is reduced by 1 </dd></dl>

</div>
</div>
<a id="ad9e0323e4ea180117997ad12e7a034d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9e0323e4ea180117997ad12e7a034d1">&#9670;&nbsp;</a></span>takeLast()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QVariantList &amp; GCF::SignalSpy::takeLast </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>copy of the last (most recent) signal emission captured by this spy.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Before returning, the emission is removed from the internal list of emissions. After this function returns <a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count()</a> is reduced by 1 </dd></dl>

</div>
</div>
<a id="a508a02bfd99de429664b06ffc003d9a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a508a02bfd99de429664b06ffc003d9a5">&#9670;&nbsp;</a></span>takeAt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QVariantList GCF::SignalSpy::takeAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>copy of the signal emission at <code>index</code> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Before returning, the emission is removed from the internal list of emissions. After this function returns <a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count()</a> is reduced by 1 </dd></dl>

</div>
</div>
<a id="aca1109495fe964ad99312c09f00e2dfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca1109495fe964ad99312c09f00e2dfd">&#9670;&nbsp;</a></span>at()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QVariantList GCF::SignalSpy::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>copy of the signal emission at <code>index</code> </dd></dl>

</div>
</div>
<a id="ae6c9e4ca60efe8f6121eab5fd02a79bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6c9e4ca60efe8f6121eab5fd02a79bf">&#9670;&nbsp;</a></span>removeAt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::SignalSpy::removeAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes signal emission information at <code>index</code>.</p>
<dl class="section note"><dt>Note</dt><dd>index has to be &gt;= 0 and &lt; <a class="el" href="class_g_c_f_1_1_signal_spy.html#ae7e70938eb812db1fc554330d3f95b60">count()</a> </dd></dl>

</div>
</div>
<a id="a849feb53759303827b198888931dd545"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a849feb53759303827b198888931dd545">&#9670;&nbsp;</a></span>emissions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QList&lt; QVariantList &gt; &amp; GCF::SignalSpy::emissions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>const reference to the internal list of emissions maintained by this spy </dd></dl>

</div>
</div>
<a id="a59f0b4bc8caf735a0cfdd1e4dd0e26db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59f0b4bc8caf735a0cfdd1e4dd0e26db">&#9670;&nbsp;</a></span>handleSignalEmission()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::SignalSpy::handleSignalEmission </td>
          <td>(</td>
          <td class="paramtype">const QVariantList &amp;&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This virtual function is called whenever a signal emission is detected. By default the function implemented to emits the caughtSignal() signal.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>list of parameters emitted by the signal. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aclass_g_c_f_1_1_signal_spy_html"><div class="ttname"><a href="class_g_c_f_1_1_signal_spy.html">GCF::SignalSpy</a></div><div class="ttdoc">Enables introspection of signal emissions from a QObject.</div><div class="ttdef"><b>Definition:</b> SignalSpy.h:105</div></div>
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
